﻿@model IEnumerable<TracNghiem.Areas.Admin.Models.PhanLoaiModel>
<div align="center"><h1>QUẢN TRỊ PHÂN LOẠI DỊCH VỤ</h1></div>             
<div class="container_12">    
    <div class="grid_12"> 
        <!-- Notification boxes -->
        @if (TempData["msg"] != null)
        {                            
            <span class="notification n-success">@TempData["msg"]</span>
        }
        @if (TempData["error"] != null)
        {                            
            <span class="notification n-error">@TempData["error"]</span>
        }
        <div><h3>Dịch vụ: <font color="maroon">@ViewBag.tendichvu</font></h3></div>
        @using (Html.BeginForm("FindPhanLoai", "PhanLoai", FormMethod.Post, new { id = "FindPhanLoai", name = "FindPhanLoai" }))
        {
            @*<div class="bottom-spacing">
                <lable>Dịch vụ: </lable>
                @if (ViewBag.dichvu_id != null)
                {                               
                    @Html.DropDownList("service_id", ViewBag.dichvu_id as SelectList, "---Chọn dịch vụ---", new { style = "margin-left:17px" })          
                }
            </div>*@
            <div class="bottom-spacing">
                
                @*<input class="submit-green" type="submit" value="Tìm kiếm" style="width:8.5%; padding-left:3px"  />*@
            
                <div class="float-right">
                    <a href="@Url.Action("AddPhanLoai", "PhanLoai", new { id=@ViewBag.dichvu_id})" class="button">
                        <span>Thêm mới<img src="@Url.Content("~/Areas/Admin/Content/themes/template/image/plus-small.gif")" width="12" height="9" alt="New article" /></span>
                    </a>
                </div>             
            </div>  
        }        
        @using (Html.BeginForm("CheckedAction", "PhanLoai", FormMethod.Post, new { id = "CheckedAction", name = "CheckedAction" }))
        { 
            <div class="module">
                <h2><span></span></h2>                    
                <div class="module-table-body">
                    <div class="scrolling">
                        <div class="data-table" style="width:100%">
                            <table id="myTable" class="tablesorter">
                                <thead>
                                    <tr>
                                        <th style="width:4%;">Xóa</th>
                                        <th style="width:4%;">Sửa</th>
                                        <th style="width:4%;">STT</th> 
                                        <th style="width:30%;">Phân loại</th>
                                        <th style="width:8%;">Di chuyển</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    @{int stt = 0;}
                                    @foreach (var item in Model)
                                    {
                                        stt++;                                         
                                        
                                            <tr>
                                            <td class="align-center">
                                                <a href="@Url.Action("DeletePhanLoai", "PhanLoai", new { id = item.id,dichvu_id=item.dichvu_id })" onclick="return confirm('Bạn muốn xóa thông tin này?');" title="Xóa thông tin"><img src="@Url.Content("~/Areas/Admin/Content/themes/template/image/cross-on-white.gif")" width="16" height="16" alt="delete" /></a>
                                             
                                            </td>     
                                            <td class="align-center">
                                                <a href="@Url.Action("EditPhanLoai", "PhanLoai", new { id = item.id })" title="Sửa thông tin"><img src="@Url.Content("~/Areas/Admin/Content/themes/template/image/pencil.gif")"  width="16" height="16" alt="edit" /></a>
                                                                                        
                                            </td>
                                            <td class="align-center">@stt</td> 
                                            
                                            <td>@Html.DisplayFor(modelItem => item.name)</td>
                                            <td class="align-center">
                                                <a href="@Url.Action("Sapxep_PhanLoai", "PhanLoai", new { dichvu_id = item.dichvu_id, id = item.id, order = 1 })" title="Di chuyển lên"><img src="@Url.Content("~/Areas/Admin/Content/themes/template/image/arrow_up.png")"  width="16" height="16" alt="edit" /></a> &nbsp;&nbsp                                                                                       
                                                <a href="@Url.Action("Sapxep_PhanLoai", "PhanLoai", new { dichvu_id = item.dichvu_id, id = item.id, order = 0 })" title="Di chuyển xuống"><img src="@Url.Content("~/Areas/Admin/Content/themes/template/image/arrow_down.png")"  width="16" height="16" alt="edit" /></a>                                                                                        
                                            </td>        
                                        </tr>
                                    }
                                </tbody>
                            </table>
                        </div>      
                    </div>    
                    <div class="pager" id="pager">
                        <form action="">
                            <div>
                            <img class="first" src="@Url.Content("~/Areas/Admin/Content/themes/template/image/arrow-stop-180.gif")"/>
                            <img class="prev" src="@Url.Content("~/Areas/Admin/Content/themes/template/image/arrow-180.gif")"/> 
                            <input type="text" class="pagedisplay input-short align-center"/>
                            <img class="next" src="@Url.Content("~/Areas/Admin/Content/themes/template/image/arrow.gif")"/>
                            <img class="last" src="@Url.Content("~/Areas/Admin/Content/themes/template/image/arrow-stop.gif")"/> 
                            <select class="pagesize input-short align-center">
                                <option value="10" selected="selected">10</option>
                                <option value="20">20</option>
                                <option value="30">30</option>
                                <option value="40">40</option>
                            </select>
                            </div>
                        </form>
                    </div>
                    
                    <div style="clear: both"></div>
                    </div> <!-- End .module-table-body -->
            </div> <!-- End .module -->
        }    
	</div> <!-- End .grid_12 -->
</div> <!-- End .container_12 -->

